﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace MessageBox
{
    /// <summary>
    /// Logique d'interaction pour BoxMessage.xaml
    /// </summary>
    public partial class BoxMessage : Window
    {
        /// <summary>
        /// Booléen permettant de savoir sur quel bouton l'utilisateur a cliqué
        /// </summary>
        public Boolean Confirm
        {
            get;
            set;
        }

        public Image LogoS 
        {
            get
            {
                return Logo;
            }
        }

        /// <summary>
        /// Constructeur vide
        /// </summary>
        public BoxMessage()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Méthode permettant d'affciher la fenetre modale
        /// </summary>
        /// <returns>Retourne le résultat de la fenêtre</returns>
        public virtual TYPE_RESULT_BOX ShowScreen()
        {
            //double screenWidth = System.Windows.SystemParameters.PrimaryScreenWidth;
            //double screenHeight = System.Windows.SystemParameters.PrimaryScreenHeight;
            //double windowWidth = this.Width;
            //double windowHeight = this.Height;
            //this.Left = (screenWidth / 2) - (windowWidth / 2);
            //this.Top = (screenHeight / 2) - (windowHeight / 2);

            this.ShowDialog();
            return Confirm ? TYPE_RESULT_BOX.OK : TYPE_RESULT_BOX.KO;
        }
    }
}
